package com.tuanzi.loan.web.lazy.member;

import com.tuanzi.loan.business.service.member.LoanMemberOrderService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.member.LoanMemberOrderRequest;
import com.tuanzi.loan.vo.response.member.LoanMemberOrderResponse;
import org.springframework.data.domain.Page;

/**
 * @Author: chenweijun
 * @Date: 2019/3/29 19:52
 * @Description:
 */
public class LoanMemberOrderLazyDataModel extends BaseLazyDataModel<LoanMemberOrderRequest, LoanMemberOrderResponse>{

    private LoanMemberOrderService loanMemberOrderService = SpringContextHolder.getBean(LoanMemberOrderService.class);

    public LoanMemberOrderLazyDataModel(LoanMemberOrderRequest request) {
        super(request);
    }

    @Override
    protected Page<LoanMemberOrderResponse> doLoad(PageSearcher<LoanMemberOrderRequest> pageSearcher) {
        return loanMemberOrderService.list(pageSearcher);
    }
}
